Skip to content

Conversation

@xPucTu4
Copy link

@xPucTu4 xPucTu4 commented Feb 18, 2025

  • Added handling for ApiEmptySentence in ApiCommand.cs to return an empty list when the first response is empty.
  • Introduced !empty case in ApiConnection.cs to process empty responses.
  • Created ApiEmptySentence class to manage empty response types, enhancing API functionality.

Closes #103

Deantwo and others added 5 commits March 7, 2024 00:13
Changed RegEx to allow for sentences with empty values.
Fixes danikf#97
Changed EnsureSingleResponse to ignore responses with only ".section" words.
Fixes danikf#96
Ignore sections in EnsureSingleResponse
Fixed reading ReSentences with empty value
- Added handling for `ApiEmptySentence` in `ApiCommand.cs` to return an empty list when the first response is empty.
- Introduced `!empty` case in `ApiConnection.cs` to process empty responses.
- Created `ApiEmptySentence` class to manage empty response types, enhancing API functionality.
Copy link
Contributor

@Deantwo Deantwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks elegant and follows the same conventions as already used in the project.

Update to handle the new RouterOS v7.18 api syntax with empty responses
@xPucTu4
Copy link
Author

xPucTu4 commented Feb 18, 2025

Thanks! I was unsure if I should create an ApiEmptySentence or modify the ReSentence, but this way looks cleaner to me.

@Deantwo
Copy link
Contributor

Deantwo commented Feb 18, 2025

I merged your changes into my own fork's master branch, since @danikf has been MIA for a good while.

Add package metadata to tik4net.csproj
Copy link
Contributor

@Deantwo Deantwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you just merged #98 and #99 into your master branch, along with that "Prepare for nuget publishing:", so they are now part of this pull request too. Not sure there is a way to fix that without re-doing your whole pull request. 😨
I don't know if that was my doing somehow. Or if you just clicked a button to pull from upstream or something. 😟

As a reminder, it is usually a good idea to always use a branch on your fork when making a pull request. That way you don't end up with issues like this, where you accidently add more stuff to your master branch.
And as an added bonus, you can give your branches funny descriptive names.

@Deantwo
Copy link
Contributor

Deantwo commented Feb 18, 2025

You can try making a new branch from the initial commit by going here: https://github.com/xPucTu4/tik4net/tree/4d4ed75f640dfa540d16e1c270653c4532a42512
And then create a branch by clicking the branch button (1), typing a name in the branch dropdown menu's search (2), and then clicking "Create branch" (3).
image
And then you can create a new pull request to danikf / tik4net : master from xPucTu4 / tik4net : some-name.

@xPucTu4
Copy link
Author

xPucTu4 commented Feb 18, 2025

Will fix it in a minute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for !empty Response Type in API Queries (RouterOS v7.18)

2 participants